package com.slz3.business.module.configManagement.conActivityIndex.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.configManagement.conActivityIndex.domain.ConActivityIndex;
import com.slz3.business.module.configManagement.conActivityIndex.domain.ConActivityIndexCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class ConActivityIndexResAtomic {

    static Mono<ServerResponse> add_$ConActivityIndexUpdateLock(ServerRequest req, ConActivityIndex conActivityIndex) {
        return ConActivityIndexResSafeValid.add(req, conActivityIndex) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConActivityIndexResExecutor.add(req, conActivityIndex);
    }

    public static Mono<ServerResponse> delete_$ConActivityIndexUpdateLock(ServerRequest req, ConActivityIndexCondition conActivityIndexCondition) {
        return ConActivityIndexResSafeValid.delete(req, conActivityIndexCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConActivityIndexResExecutor.delete(req);
    }

    static Mono<ServerResponse> modify_$ConActivityIndexUpdateLock(ServerRequest req, ConActivityIndex conActivityIndex) {
        return ConActivityIndexResSafeValid.modify(req, conActivityIndex) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConActivityIndexResExecutor.modify(req, conActivityIndex);
    }

    static Mono<ServerResponse> info_$ConActivityIndexUpdateLock(ServerRequest req) {
        return ConActivityIndexResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConActivityIndexResExecutor.info(req);
    }

    public static Mono<ServerResponse> auditSubmit_$ConActivityIndexUpdateLock(ServerRequest req, ConActivityIndexCondition conActivityIndexCondition) {
        return ConActivityIndexResSafeValid.auditSubmit(req, conActivityIndexCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConActivityIndexResExecutor.auditSubmit(req);
    }

    public static Mono<ServerResponse> audit_$ConActivityIndexUpdateLock(ServerRequest req, ConActivityIndexCondition conActivityIndexCondition) {
        return ConActivityIndexResSafeValid.audit(req, conActivityIndexCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConActivityIndexResExecutor.audit(req);
    }

    public static Mono<ServerResponse> auditReject_$ConActivityIndexUpdateLock(ServerRequest req, ConActivityIndexCondition conActivityIndexCondition) {
        return ConActivityIndexResSafeValid.auditReject(req, conActivityIndexCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConActivityIndexResExecutor.auditReject(req);
    }


    public static Mono<ServerResponse> usingEnable_$ConActivityIndexUpdateLock(ServerRequest req, ConActivityIndexCondition conActivityIndexCondition) {
        return ConActivityIndexResSafeValid.usingEnable(req, conActivityIndexCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConActivityIndexResExecutor.usingEnable(req);
    }

    public static Mono<ServerResponse> usingDisable_$ConActivityIndexUpdateLock(ServerRequest req, ConActivityIndexCondition conActivityIndexCondition) {
        return ConActivityIndexResSafeValid.usingDisable(req, conActivityIndexCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConActivityIndexResExecutor.usingDisable(req);
    }
}
